/**
 * @Project TMHSCFX
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2011 TMH. All rights reserved
 * @Createdate Feb 27, 2011
 * @Createtime 6:05:21 PM
 */

package com.tmh.study.aS3DP.mcv.weatherMap
{
	import com.tmh.study.aS3DP.mcv.minimalist.ComponentView;
	import com.tmh.study.aS3DP.mcv.minimalist.CompositeView;

	import flash.display.Sprite;
	import flash.events.Event;

	import spark.components.ComboBox;
	import spark.components.Group;

	public class Main extends Sprite
	{
		public function Main()
		{
			super();

			var model:IModel = new Model();
			var controller:ICompInputHandler = new Controller(model);

			// composite view
			var view:CBView = new CBView(model, controller);
			// register to view to recieve notifications from the model
			model.addEventListener(Event.CHANGE, view.update);

			addChild(view);

			// adding a child view
			var map:MapView = new MapView(model);
			view.add(map);
			map.x = 0
			map.y = 40;
			addChild(map);
		}
	}
}